﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security.Principal;
using System.Web;
using System.Web.Security;
using Microsoft.VisualBasic.ApplicationServices;

namespace Host.Security
{
    public class PrincipalUser 
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        public static void SetUser(string user)
        {
            if (HttpContext.Current.Session["User"] == null)
                HttpContext.Current.Session["User"] = user;
            HttpContext.Current.Session["User"] = user;
        }

        public static MembershipUser LoggedInUser {
            get{
            return Membership.GetUser(true);
        }
        }
    }
}